home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Controls
/
Visual Basic Controls.iso
/
vbcontrol
/
t2win-32
/
_mailnws.frm
(
.txt
)
< prev
next >
Wrap
Visual Basic Form
|
1998-07-13
|
10KB
|
209 lines
VERSION 5.00
Begin VB.Form frmMailNews
BorderStyle = 4 'Fixed ToolWindow
Caption = "Miscelleanous"
ClientHeight = 6060
ClientLeft = 1890
ClientTop = 3270
ClientWidth = 9270
MaxButton = 0 'False
MDIChild = -1 'True
PaletteMode = 1 'UseZOrder
ScaleHeight = 6060
ScaleWidth = 9270
ShowInTaskbar = 0 'False
Begin VB.Frame Frame1
Height = 570
Left = 0
TabIndex = 1
Top = -90
Width = 9270
Begin VB.CommandButton cmdNP
Caption = ">"
Height = 285
Index = 1
Left = 8910
TabIndex = 6
Top = 195
Width = 285
End
Begin VB.CommandButton cmdNP
Caption = "<"
Height = 285
Index = 0
Left = 8010
TabIndex = 5
Top = 195
Width = 285
End
Begin VB.CommandButton Command1
Caption = "&Go"
Default = -1 'True
Height = 285
Left = 8370
TabIndex = 4
Top = 195
Width = 465
End
Begin VB.ComboBox cmb_Function
Height = 315
Left = 1365
TabIndex = 2
Top = 180
Width = 6555
End
Begin VB.Label Label2
Caption = "&Select a function"
Height = 255
Left = 90
TabIndex = 3
Top = 210
Width = 1275
End
End
Begin VB.TextBox txt_Result
BackColor = &H00C0C0C0&
BorderStyle = 0 'None
Height = 5325
Left = 105
Locked = -1 'True
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 0
Top = 630
Width = 9060
End
Attribute VB_Name = "frmMailNews"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Option Base 1
Private Const Iteration = 100
Dim IsLoaded As Integer
Dim TimerStartOk As Integer
Dim TimerCloseOk As Integer
Dim TimerHandle As Integer
Dim TimerValue As Long
Private Sub cmdNP_Click(Index As Integer)
Call sub_NextPrev(cmb_Function, Index)
End Sub
Private Sub cmb_Function_Click()
If (IsLoaded = False) Then Exit Sub
Call cDisableFI(mdiT2W.Picture1)
txt_Result = ""
DoEvents
Select Case cmb_Function.ListIndex
Case 0
Call TestMailNews
End Select
DoEvents
Call cEnableFI(mdiT2W.Picture1)
End Sub
Private Sub Form_Activate()
mdiT2W.Label2.Caption = cInsertBlocks(mdiT2W.Label2.Tag, "" & Iteration)
End Sub
Private Sub Form_Load()
IsLoaded = False
Show
Call sub_Load_Combo(cmb_Function, T2WDirInst + "_mailnws.t2w")
IsLoaded = True
End Sub
Private Sub Command1_Click()
Call cmb_Function_Click
End Sub
Private Sub TestMailNews()
Dim lResult As Long
Dim strResult As String
Dim strDisplay As String
Dim i As Integer
Dim File1 As String
Dim File2 As String
Dim File3 As String
Dim Ptr As Long
Dim NextPtr As Long
Dim FileName As String
Dim TypeOfEncoding As Integer
Dim FileState As Long
Dim rc As Integer
Dim ErrorDecodeOp As Long
Dim ErrorMoveOp As Long
ReDim FileM(1 To 3) As String
strResult = ""
strDisplay = ""
File1 = T2WFileTest
File2 = "autoexec.mailnews"
strDisplay = strDisplay & "File Copy '" & File1 & "' to '" & File2 & "' is " & cFileCopy(File1, File2) & vbCrLf & vbCrLf
strDisplay = strDisplay & "Encoding (if [ok] then [size of file] else [error]) with " & vbCrLf
strDisplay = strDisplay & " header : MNHDR_MAIL" & vbCrLf
strDisplay = strDisplay & " linesperfile : 0 (=> single-part)" & vbCrLf
strDisplay = strDisplay & " sender : T2WIN-32" & vbCrLf
strDisplay = strDisplay & " receiver : The MCR Company" & vbCrLf
strDisplay = strDisplay & " subject : Mail & News from TIME TO WIN 32-Bit (...))" & vbCrLf & vbCrLf
FileM(1) = "autoexec.uuencode"
strDisplay = strDisplay & " initialization is " & IIf(cMNInitialize() = MNRET_OK, "OK", "error") & vbCrLf
strDisplay = strDisplay & " encode '" & File2 & "' into '" & FileM(1) & "' (uuencode) is " & cMNEncode(File2, FileM(1), FileM(1), MN_UU_ENCODED, 0, MNHDR_MAIL, "The MCR", "Company", "Mail & News from TIME TO WIN 32-Bit (UUENCODED)") & vbCrLf
strDisplay = strDisplay & " shutdown is " & IIf(cMNShutdown() = MNRET_OK, "OK", "error") & vbCrLf & vbCrLf
FileM(2) = "autoexec.xxencode"
strDisplay = strDisplay & " initialization is " & IIf(cMNInitialize() = MNRET_OK, "OK", "error") & vbCrLf
strDisplay = strDisplay & " encode '" & File2 & "' into '" & FileM(2) & "' (xxencode) is " & cMNEncode(File2, FileM(2), FileM(2), MN_XX_ENCODED, 0, MNHDR_MAIL, "The MCR", "Company", "Mail & News from TIME TO WIN 32-Bit (XXENCODED)") & vbCrLf
strDisplay = strDisplay & " shutdown is " & IIf(cMNShutdown() = MNRET_OK, "OK", "error") & vbCrLf & vbCrLf
FileM(3) = "autoexec.b64encode"
strDisplay = strDisplay & " initialization is " & IIf(cMNInitialize() = MNRET_OK, "OK", "error") & vbCrLf
strDisplay = strDisplay & " encode '" & File2 & "' into '" & FileM(3) & "' (b64encode) is " & cMNEncode(File2, FileM(3), FileM(3), MN_B64ENCODED, 0, MNHDR_MAIL, "The MCR", "Company", "Mail & News from TIME TO WIN 32-Bit (B64ENCODED)") & vbCrLf
strDisplay = strDisplay & " shutdown is " & IIf(cMNShutdown() = MNRET_OK, "OK", "error") & vbCrLf & vbCrLf
File3 = "autoexec.compound"
strDisplay = strDisplay & "Merge '" & FileM(1) & "' and '" & FileM(2) & "' and '" & FileM(3) & " into '" & File3 & "' is " & cFileMergeExt(FileM(), File3) & vbCrLf & vbCrLf
strDisplay = strDisplay & "Loading '" & File3 & "' in the list of files to be processed" & vbCrLf & vbCrLf
strDisplay = strDisplay & " initialization is " & IIf(cMNInitialize() = MNRET_OK, "OK", "error") & vbCrLf
strDisplay = strDisplay & " loadinlist is " & cMNLoadInList(File3, False) & vbCrLf
strDisplay = strDisplay & " countinlist is " & cMNCountInList() & vbCrLf & vbCrLf
strDisplay = strDisplay & " enumeration of all files in the current list of files :" & vbCrLf & vbCrLf
If (cMNFirstInList(Ptr) = True) Then
i = 1
Do
rc = cMNWalkInList(Ptr, FileName, TypeOfEncoding, FileState, NextPtr)
strDisplay = strDisplay & " file(" & i & ") is '" & FileName & "' (typeofencoding : " & TypeOfEncoding & ", filestate : " & FileState & ")" & vbCrLf
i = i + 1
Ptr = NextPtr
Loop Until rc = False
strDisplay = strDisplay & vbCrLf
Else
strDisplay = strDisplay & " no files found" & vbCrLf & vbCrLf
End If
strDisplay = strDisplay & " shutdown is " & IIf(cMNShutdown() = MNRET_OK, "OK", "error") & vbCrLf & vbCrLf
strDisplay = strDisplay & " Decoding of all files in the current list of files" & vbCrLf & vbCrLf
strDisplay = strDisplay & " initialization is " & IIf(cMNInitialize() = MNRET_OK, "OK", "error") & vbCrLf
strDisplay = strDisplay & " loadinlist is " & cMNLoadInList(File3, False) & vbCrLf
strDisplay = strDisplay & " countinlist is " & cMNCountInList() & vbCrLf & vbCrLf
If (cMNFirstInList(Ptr) = True) Then
i = 1
Do
rc = cMNWalkInList(Ptr, FileName, TypeOfEncoding, FileState, NextPtr)
strDisplay = strDisplay & " file(" & i & ") is '" & FileName & "'" & vbCrLf
strDisplay = strDisplay & " rename into 'testma